﻿@{
    ViewData["Title"] = await SystemConfig.GetByFieldNameAsync("SiteName");
    ViewData["Description"] = await SystemConfig.GetByFieldNameAsync("Description");
    Layout = null;
}
@inject ContentService contentService
@inject ContentCateService contentCateService
<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="@ViewData["Description"]">
    <meta name="author" content="Cdeng">
    <title>@ViewData["Title"]</title>
    <link href="~/lib/layui/css/layui.css" rel="stylesheet">
    <link href="~/home/css/main.css" rel="stylesheet">

</head>
<body>
    <!--头部部分 开始-->
    <partial name="_Header" />
    <!--头部部分 结束-->

    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-card qy_top">
                <div class="layui-card-body qy_top_info">
                    <div class="layui-col-md8 ">
                        <div class="qy_top_left">
                            <i class="layui-icon layui-icon-senior" style="font-size: 16px; "></i>
                            开心！
                        </div>
                    </div>
                    <div class="layui-col-md4 ">
                        <import file="block/common.html" name="search" />
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div class="layui-container">
        <div class="layui-row">
            <!--五张图显示  START-->
            <div id="qy_main">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md6 ">
                        <div class="layui-panel dqy_header_images" style="padding:10px;height:340px;text-align:center;">
                            @foreach (var item in await contentService.QyList(new() { Cid = "0", Limit = 1, CacheName = "calist-right-toutiao", CacheTime = 600, Att = 1, ImgBl = true, Orderby = "Id DESC" }))
                            {
                                <div class="layui-col-md12" style="height:320px;">
                                    <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link"><img src="@item.Img" height=290 width=540 /></a>
                                    <br>
                                    <div style="height:30px;line-height:30px;">
                                        <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link">@item.Title</a>
                                    </div>
                                </div>
                            }
                        </div>
                    </div>
                    <div class="layui-col-md6 layui-col-space15">
                        @foreach (var item in await contentService.QyList(new() { Cid = "0", Limit = 4, CacheName = "calist-right-toutiao-att2222", CacheTime = 600, Att = 2, ImgBl = true, Orderby = "Id DESC" }))
                        {
                            <div class="layui-col-md6 " style="height:180px;">
                                <div class="layui-panel dqy_header_images_small" style="text-align:center;">
                                    <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link"><img src="@item.Img" height=140 width=260 /></a>
                                    <br>
                                    <div style="height:35px;line-height:35px;">
                                        <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link">@item.Title</a>
                                    </div>
                                </div>
                            </div>
                        }
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!--五张图显示  end-->
    <div class="layui-container">
        <div class="layui-row" style="height:150px;margin-top:10px;margin-bottom:10px;">
            <div class="layui-hide-xs layui-col-md12">
                <div><img src="~/home/images/ad_index.jpg" width="1140" height="150" /></div>
            </div>
        </div>
    </div>


    <!--图片内容列表  START-->
    <div class="layui-container">
        <div class="layui-row">
            <div id="qy_main">
                <div class="layui-col-md12 layui-col-space15">
                    @foreach (var item in await contentService.QyList(new() { Cid = "0", Limit = 12, CacheName = "cate22", CacheTime = 500, ImgBl = true, Orderby = "Id DESC" }))
                    {
                        <div class="layui-col-md3 " style="height:180px;">
                            <div class="layui-panel dqy_header_images_small" style="text-align:center;">
                                <a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link"><img src="@item.Img" height=140 width=260 /></a>
                                <br>
                                <div style="height:35px;line-height:35px;"><a asp-area="Home" asp-controller="Info" asp-action="Index" asp-route-id="@item.Id" class="nav-link">@item.Title</a></div>
                            </div>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>


    <partial name="_Footer" />
    <script src="~/lib/layui/layui.js"></script>
    <script>
        layui.use(function () {

        });
    </script>
</body>
</html>

